#!/usr/bin/env python
dailyData = {
'Jelly' : {'url' : 'http://www.neopets.com/jelly/jelly.phtml',
           'phraseInForm' : 'Grab some Jelly',
           'fileToWrite' : 'logs/jelly.html',
           'freq': 'daily',
           'reg' : [('win',"""You take some <b>(.+)</b>""")] },


'Omelette' : {'url' : 'http://www.neopets.com/prehistoric/omelette.phtml',
           'phraseInForm' : 'Grab some Omelette',
           'fileToWrite' : 'logs/omelette.html',
           'freq': 'daily',
           'reg' : [('win',"""http://images\.neopets\.com/items/.+\.gif"""),('notyet',"""'NO!  You cannot take more than one slice per day!""")] },


'Anchor' : {'url' : 'http://www.neopets.com/pirates/anchormanagement.phtml',
           'phraseInForm' : 'HiddenControl(action=',
           'fileToWrite' : 'logs/anchor.html',
           'freq': 'daily',
           'reg' : [('win',"""prize-item-name">(.+)<""")] },


'Shrine' : {'url' : 'http://www.neopets.com/desert/shrine.phtml',
           'phraseInForm' : 'Approach the Shrine',
           'fileToWrite' : 'logs/shrine.html',
           'freq': '720',
           'reg' : [('win',"""walks slowly up to the strange shrine\.\.\..+\<p\>\<b\>(.+)\<\/b\>\<p\>\<IMG"""),
                    ('win',"""><br><b>(.+)</b><p><IMG""")] },


'Bank Interest' : {'url' : 'http://www.neopets.com/bank.phtml',
           'phraseInForm' : 'Collect Interest',
           'fileToWrite' : 'logs/bankInterest.html',
           'freq': 'daily',
           'reg' : [('win',"""Your current balance and interest rate allow you to gain <b>(.+)</b> per day""")] },


'Ice Scratch Card' : {'url' : 'http://www.neopets.com/winter/kiosk.phtml',
           'phraseInForm' : 'Yes, I will have one please',
           'fileToWrite' : 'logs/iceScratchard.html',
           'freq': '360',
           'reg' : [('win',"""You now have a <b>(.+)</b> -"""),('notyet',"""<p><b>Hey, give everybody else a chance to buy a scratchcard!!  (.+)!</b><p>""")] },


'Desert Scratch Card' : {'url' : 'http://www.neopets.com/desert/sc/kiosk.phtml',
           'phraseInForm' : 'yes, i will have one please',
           'fileToWrite' : 'logs/desertscratchard.html',
           'freq': '120',
           'reg' : [('win',"""you now have a <b>(.+)</b> -""")] },


'Halloween Scratch Card' : {'url' : 'http://www.neopets.com/halloween/scratch.phtml',
           'phraseInForm' : """OK I'll take one""",
           'fileToWrite' : 'logs/halloweenScratchard.html',
           'freq': '240',
           'reg' : [('win',"""You now have a <b>(.+)</b> -""")] },


'Fruit Machine' : {'url' : 'http://www.neopets.com/desert/fruitmachine.phtml',
           'phraseInForm' : """Spin the Wheel!!!""",
           'fileToWrite' : 'logs/fruitMachine.html',
           'freq': 'daily',
           'reg' : [('loss',"""Sorry! This is not a winning spin.<br>I hope you have better luck tomorrow!"""),
                    ('notyet',"""You have already played today."""),
                    ('win',"""<b>(.+)<br><br>""")] },


'Plushie Of Prosperity' : {'url' : 'http://www.neopets.com/faerieland/tdmbgpop.phtml',
           'phraseInForm' : """Talk to the Plushie""",
           'fileToWrite' : 'logs/plushieOfProsperity.html',
           'freq': 'daily',
           'reg' : [('win',"""You're sure you can give the <b>(.+)</b> a new home!"""),
                    ('notyet',"""You have already visited the plushie today, and he appreciates your attention, but he needs to sleep now."""),
                    ('win',"""Oh, it's a <b>.+</b>!"""),
                    ('win',"""The plushie remains ever silent, but as you leave you notice .+ Neopoints on the ground. Perhaps it was good luck or..."""),
                    ('loss',"""You wait around for a bit, but nothing seems to happen. Best be on your way."""),
                    ('win',""">While staring at the discarded plushie, (.+)</div>""")] },


'Fishing' : {'url' : 'http://www.neopets.com/water/fishing.phtml',
           'phraseInForm' : """Reel In Your Line""",
           'fileToWrite' : 'logs/fishing.html',
           'freq': '720',
           'reg' : [('win',"""<BR><B>(.+)</B>!<P></CENTER><center>""")] },


'Tombola' : {'url' : 'http://www.neopets.com/island/tombola.phtml',
           'phraseInForm' : 'Play Tombola',
           'fileToWrite' : 'logs/tombola.html',
           'freq': 'daily',
           'reg' : [('win',"""Your Prize - (.+)<\/b\>"""),
                    ('win',"""You Win.+"""),
                    ('notyet',"""Closed.  Back in an hour or so"""),
                    ('loss',"""Oh dear, that's not a winning ticket .+<center>""")] },



'Healing Springs' : {'url' : 'http://www.neopets.com/faerieland/springs.phtml',
           'phraseInForm' : 'Heal my Pets',
           'fileToWrite' : 'logs/healingSprings.html',
           'freq': '30',
           'reg' : [('win',"""All of your Neopets gain <font color=green><b>.+</b></font> hit points"""),
                    ('notavailable',"""Sorry!</b> - My magic is not fully restored yet.  Please try back later."""),
                    ('win',"""The Water Faerie says a few magical words and...</b><p><p>(.+)<p><"""),
                    ('win',"""><p><b>The Water Faerie says a few magical words and...</b><p><p><b>(.+)<p>""")] },

'Bob4Apples' : {
           'url' : 'http://www.neopets.com/halloween/applebobbing.phtml',
           'url2' : 'http://www.neopets.com/halloween/applebobbing.phtml?bobbing=1',
           'fileToWrite' : 'logs/apples.html',
           'reg' : [('win',"""Your Prize - (.+)<\/b\>"""),
                    ('loss', """While .+</div>"""),
                    ('loss', """You finally decide.+</div>"""),
                    ('loss',"""As you gaze into the water, about to bob your head in for a chance at appley-goodness, you notice a reflection in the water. It's Bart's hat. You're suddenly struck by a strange, uncomfortable feeling. Feeling ill at ease, you decide to skip bobbing for apples and head straight home. You don't sleep well."""),
                    ('win',"""<br><b>(.+)</b><br><br>It can be found in your <""")],
           'freq' : 'daily'},

'20x Bagatelle' : {
           'url' : 'http://www.neopets.com/halloween/bagatelle.phtml',
           'reg' : [('win',"""points=(\d+)""")],
           'requestToSend' : ("http://www.neopets.com/halloween/process_bagatelle.phtml?r=%s", "onData=%5Btype%20Function%5D"),
           'referer' : "http://swf.neopets.com/halloween/bagatelle_v5.swf?lang=en&baseurl=www.neopets.com",
           'fileToWrite' : 'logs/bagaRESP%s.html',
           'freq' : 'daily'},

'Slug' : { 'url' : 'http://www.neopets.com/shop_of_offers.phtml',
           'phraseInForm' : 'shop_of_offers.phtml?slorg_payout=yes',
           'url2' : 'http://www.neopets.com/shop_of_offers.phtml?slorg_payout=yes',
           'fileToWrite' : 'logs/slorgPayout.html',
           'reg' : [('win',"""\d+ Neopoints""")],
           'freq' : 'daily'},

'Wheel of Excitement' : {'url' : 'http://www.neopets.com/faerieland/wheel.phtml',
           'referer' : """http://images.neopets.com/wheels/wheel_of_excitement_v3_831fbec8f8.swf\?r=\d+""",
           'fileToWrite' : 'logs/wheel.html',
           'requestToSend' : ("http://www.neopets.com/amfphp/gateway.php", "\x00\x03\x00\x00\x00\x01\x00\x16WheelService.spinWheel\x00\x02/1\x00\x00\x00\x09\x0a\x00\x00\x00\x01\x02\x00\x012"),
           'reg' : [("win","""\d+NP"""),
                    ("win","""\d+ NP"""),
                    ("win","""\d+,\d+NP"""),
                    ("win","""\d+, \d+NP"""),
                    ('win', """<b>.+ NP<br/>"""),
                    ('win',"""<br/><br/><b>(.+NP)<br/>"""),
                    ('loss',"""You've already told me a joke today!"""),
                    ("loss","""Lava Ghoul"""),
                    ("loss","""LavaGhoul"""),
                    ("loss","""Lava Ghoul</b></font> flies down from a nearby cloud and breathes <font color='red'>FIRE</font> over your pets!""")],
           'freq' : '120'},

'Potato Counter' : {
           'url' : 'http://www.neopets.com/medieval/potatocounter.phtml',
           'phraseInForm' : 'guess',
           'fileToWrite' : 'logs/potatoe.html',
           'reg' : [('win', "You got it right in <b>\d+</b> seconds, which means you win <b>\d+</b> Neopoints!")],

           'freq' : 'daily'},

'Grumpy King' : {
           'url' : 'http://www.neopets.com/medieval/grumpyking.phtml',
           'phraseInForm' : 'Tell the King your joke',
           'fileToWrite' : 'logs/grumpyKing.html',
           'reg' : [('loss', """Drat!  It looks like your joke had no effect on the Grumpy Old King."""),
                    ('notyet',"""You've already told me a joke today!""")],
           'freq' : 'daily'
}

}
